package com.ruoyi.common.security.config;

import com.ruoyi.common.security.interceptor.NotRepeatSubmitHeaderInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.ruoyi.common.security.interceptor.HeaderInterceptor;

/**
 * 拦截器配置
 *
 * @author ruoyi
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer
{

    @Autowired
    private NotRepeatSubmitHeaderInterceptor notRepeatSubmitHeaderInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry)
    {
        registry.addInterceptor(notRepeatSubmitHeaderInterceptor).addPathPatterns("/**");
    }

}
